package financial.sharing.center.common.enums;

/**
 * @ClassName InvoiceOperationStageEnum
 * @Description TODO
 * @Author guoyuhang
 * @ @csdn https://blog.csdn.net/qq_40788718
 * @Date 2021/4/13
 * @Version 1.0
 */
public enum InvoiceOperationStageEnum {


    无("无", 0),
    待编辑("待编辑",1),
    待审核("待审核",2),
    审核中("审核中",3),
    已开票("已开票",4),
    已作废("已作废",5);

    private final String name;

    private final Integer value;

    InvoiceOperationStageEnum(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return this.name;
    }

    public Integer getValue() {
        return this.value;
    }

    public static InvoiceOperationStageEnum name2Enum(String value) {
        for (InvoiceOperationStageEnum enumName : InvoiceOperationStageEnum.values()) {
            if(enumName.getName().equals(value)) {
                return enumName;
            }
        }
        return null;
    }

    public static InvoiceOperationStageEnum int2Enum(Integer value) {
        for (InvoiceOperationStageEnum enumName : InvoiceOperationStageEnum.values()) {
            if(enumName.getValue().equals(value)) {
                return enumName;
            }
        }
        return null;
    }

}
